/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package ics414scuba;

/**
 * DISCLAIMER: This is a PROTOTYPE and must NOT be used to plan real dives.
 * @author Elliot Ito
 */
public class DiveObject {
    private static final String DIVES = "Dive";
    private static final String BREAKS = "Break";
    private boolean dive;
    private String objectName;
    private String depth = "";
    private String time;
    private char diveGroup;
    private char breakGroup;
    private int rediveGroup;
    
    /**DISCLAIMER: This is a PROTOTYPE and must NOT be used to plan real dives.
     * Constructor for a dive object for a dive
     * @param dive Dive name
     * @param depth Depth of dive
     * @param time Time of dive
     */
    public DiveObject(String dive, String depth, String time, char diveGroup){
        this.dive = true;
        this.objectName = dive;
        this.depth = depth;
        this.time = time;
        this.diveGroup = diveGroup;
    }
    
    /**DISCLAIMER: This is a PROTOTYPE and must NOT be used to plan real dives.
     * Constructor for a dive object for a break
     * @param breakN Break name of the dive
     * @param time Time of break
     * @param breakGroup Break group of the dive
     */
    public DiveObject(String breakN, String time, char breakGroup){
        this.dive = false;
        this.objectName = breakN;
        this.time = time;
        this.breakGroup = breakGroup;
    }
    
    /**DISCLAIMER: This is a PROTOTYPE and must NOT be used to plan real dives.
     * Returns the name of the object.
     * @return Name of the dive object.
     */
    public String returnName(){
        return this.objectName;
    }
    
    
    /**DISCLAIMER: This is a PROTOTYPE and must NOT be used to plan real dives.
     * Returns the dive group of the dive object
     * @return The dive group 
     */
    public char getDiveGroup(){
        return this.diveGroup;
    }
    
    
    /**DISCLAIMER: This is a PROTOTYPE and must NOT be used to plan real dives.
     * Returns the break group of the dive object
     * @return The break group
     */
    public char getBreakGroup(){
        return this.breakGroup;
    }
    
    /**tester
    public void setRediveGroup(char breakGroup, char diveGroup){
    }*/
    
    /**DISCLAIMER: This is a PROTOTYPE and must NOT be used to plan real dives.
     * Returns the time spent for the dive object
     * @return Time of the dive object
     */
    public String getTime(){
        return this.time;
    }
    
    /**DISCLAIMER: This is a PROTOTYPE and must NOT be used to plan real dives.
     * Returns the depth of the dive for the dive object
     * @return Depth of the dive object
     */
    public String returnDepth(){
        return this.depth;
    }
          
    /**DISCLAIMER: This is a PROTOTYPE and must NOT be used to plan real dives.
     * Returns if the object is a dive or a break
     * @return String if the object is a dive or a break
     */
    public String returnType(){
        if(this.dive){
            return DIVES;
        }
        else{
            return this.BREAKS;
        }
            
    }
    
   /**
   * DISCLAIMER: This is a PROTOTYPE and must NOT be used to plan real dives.
   * Custom toString for object
   * @return custom toString for object
   */
    @Override
    public String toString(){
        if(this.dive){
            return this.objectName+" "+this.depth+" "+this.time+" "+this.diveGroup;
        }
        else{
            return this.objectName+" "+this.time+" "+this.breakGroup;
        }
    }
}
